3.74 \(\int (e x)^{-1+2 n} (a+b \text{sech}(c+d x^n)) \, dx\)

Optimal. Leaf size=135 \[ -\frac{i b x^{-2 n} (e x)^{2 n} \text{PolyLog}\left (2,-i e^{c+d x^n}\right )}{d^2 e n}+\frac{i b x^{-2 n} (e x)^{2 n} \text{PolyLog}\left (2,i e^{c+d x^n}\right )}{d^2 e n}+\frac{a (e x)^{2 n}}{2 e n}+\frac{2 b x^{-n} (e x)^{2 n} \tan ^{-1}\left (e^{c+d x^n}\right )}{d e n} \]

[Out]

(a*(e*x)^(2*n))/(2*e*n) + (2*b*(e*x)^(2*n)*ArcTan[E^(c + d*x^n)])/(d*e*n*x^n) - (I*b*(e*x)^(2*n)*PolyLog[2, (-
I)*E^(c + d*x^n)])/(d^2*e*n*x^(2*n)) + (I*b*(e*x)^(2*n)*PolyLog[2, I*E^(c + d*x^n)])/(d^2*e*n*x^(2*n))

________________________________________________________________________________________

Rubi [A]  time = 0.113346, antiderivative size = 135, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 6, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.273, Rules used = {14, 5440, 5436, 4180, 2279, 2391} \[ -\frac{i b x^{-2 n} (e x)^{2 n} \text{PolyLog}\left (2,-i e^{c+d x^n}\right )}{d^2 e n}+\frac{i b x^{-2 n} (e x)^{2 n} \text{PolyLog}\left (2,i e^{c+d x^n}\right )}{d^2 e n}+\frac{a (e x)^{2 n}}{2 e n}+\frac{2 b x^{-n} (e x)^{2 n} \tan ^{-1}\left (e^{c+d x^n}\right )}{d e n} \]

Antiderivative was successfully verified.

[In]

Int[(e*x)^(-1 + 2*n)*(a + b*Sech[c + d*x^n]),x]

[Out]

(a*(e*x)^(2*n))/(2*e*n) + (2*b*(e*x)^(2*n)*ArcTan[E^(c + d*x^n)])/(d*e*n*x^n) - (I*b*(e*x)^(2*n)*PolyLog[2, (-
I)*E^(c + d*x^n)])/(d^2*e*n*x^(2*n)) + (I*b*(e*x)^(2*n)*PolyLog[2, I*E^(c + d*x^n)])/(d^2*e*n*x^(2*n))

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 5440

Int[((e_)*(x_))^(m_.)*((a_.) + (b_.)*Sech[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[(e^IntPart[m]*(e*
x)^FracPart[m])/x^FracPart[m], Int[x^m*(a + b*Sech[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x]

Rule 5436

Int[(x_)^(m_.)*((a_.) + (b_.)*Sech[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simpli
fy[(m + 1)/n] - 1)*(a + b*Sech[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplif
y[(m + 1)/n], 0] && IntegerQ[p]

Rule 4180

Int[csc[(e_.) + Pi*(k_.) + (Complex[0, fz_])*(f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-2*(c
+ d*x)^m*ArcTanh[E^(-(I*e) + f*fz*x)/E^(I*k*Pi)])/(f*fz*I), x] + (-Dist[(d*m)/(f*fz*I), Int[(c + d*x)^(m - 1)*
Log[1 - E^(-(I*e) + f*fz*x)/E^(I*k*Pi)], x], x] + Dist[(d*m)/(f*fz*I), Int[(c + d*x)^(m - 1)*Log[1 + E^(-(I*e)
 + f*fz*x)/E^(I*k*Pi)], x], x]) /; FreeQ[{c, d, e, f, fz}, x] && IntegerQ[2*k] && IGtQ[m, 0]

Rule 2279

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int (e x)^{-1+2 n} \left (a+b \text{sech}\left (c+d x^n\right )\right ) \, dx &=\int \left (a (e x)^{-1+2 n}+b (e x)^{-1+2 n} \text{sech}\left (c+d x^n\right )\right ) \, dx\\ &=\frac{a (e x)^{2 n}}{2 e n}+b \int (e x)^{-1+2 n} \text{sech}\left (c+d x^n\right ) \, dx\\ &=\frac{a (e x)^{2 n}}{2 e n}+\frac{\left (b x^{-2 n} (e x)^{2 n}\right ) \int x^{-1+2 n} \text{sech}\left (c+d x^n\right ) \, dx}{e}\\ &=\frac{a (e x)^{2 n}}{2 e n}+\frac{\left (b x^{-2 n} (e x)^{2 n}\right ) \operatorname{Subst}\left (\int x \text{sech}(c+d x) \, dx,x,x^n\right )}{e n}\\ &=\frac{a (e x)^{2 n}}{2 e n}+\frac{2 b x^{-n} (e x)^{2 n} \tan ^{-1}\left (e^{c+d x^n}\right )}{d e n}-\frac{\left (i b x^{-2 n} (e x)^{2 n}\right ) \operatorname{Subst}\left (\int \log \left (1-i e^{c+d x}\right ) \, dx,x,x^n\right )}{d e n}+\frac{\left (i b x^{-2 n} (e x)^{2 n}\right ) \operatorname{Subst}\left (\int \log \left (1+i e^{c+d x}\right ) \, dx,x,x^n\right )}{d e n}\\ &=\frac{a (e x)^{2 n}}{2 e n}+\frac{2 b x^{-n} (e x)^{2 n} \tan ^{-1}\left (e^{c+d x^n}\right )}{d e n}-\frac{\left (i b x^{-2 n} (e x)^{2 n}\right ) \operatorname{Subst}\left (\int \frac{\log (1-i x)}{x} \, dx,x,e^{c+d x^n}\right )}{d^2 e n}+\frac{\left (i b x^{-2 n} (e x)^{2 n}\right ) \operatorname{Subst}\left (\int \frac{\log (1+i x)}{x} \, dx,x,e^{c+d x^n}\right )}{d^2 e n}\\ &=\frac{a (e x)^{2 n}}{2 e n}+\frac{2 b x^{-n} (e x)^{2 n} \tan ^{-1}\left (e^{c+d x^n}\right )}{d e n}-\frac{i b x^{-2 n} (e x)^{2 n} \text{Li}_2\left (-i e^{c+d x^n}\right )}{d^2 e n}+\frac{i b x^{-2 n} (e x)^{2 n} \text{Li}_2\left (i e^{c+d x^n}\right )}{d^2 e n}\\ \end{align*}

Mathematica [A]  time = 0.174758, size = 260, normalized size = 1.93 \[ \frac{x^{-2 n} (e x)^{2 n} \left (-2 i b \text{PolyLog}\left (2,-i e^{c+d x^n}\right )+2 i b \text{PolyLog}\left (2,i e^{c+d x^n}\right )+a d^2 x^{2 n}+2 i b d x^n \log \left (1-i e^{c+d x^n}\right )-2 i b d x^n \log \left (1+i e^{c+d x^n}\right )+2 i b c \log \left (1-i e^{c+d x^n}\right )-\pi b \log \left (1-i e^{c+d x^n}\right )-2 i b c \log \left (1+i e^{c+d x^n}\right )+\pi b \log \left (1+i e^{c+d x^n}\right )-2 i b c \log \left (\cot \left (\frac{1}{4} \left (2 i c+2 i d x^n+\pi \right )\right )\right )+\pi b \log \left (\cot \left (\frac{1}{4} \left (2 i c+2 i d x^n+\pi \right )\right )\right )\right )}{2 d^2 e n} \]

Antiderivative was successfully verified.

[In]

Integrate[(e*x)^(-1 + 2*n)*(a + b*Sech[c + d*x^n]),x]

[Out]

((e*x)^(2*n)*(a*d^2*x^(2*n) + (2*I)*b*c*Log[1 - I*E^(c + d*x^n)] - b*Pi*Log[1 - I*E^(c + d*x^n)] + (2*I)*b*d*x
^n*Log[1 - I*E^(c + d*x^n)] - (2*I)*b*c*Log[1 + I*E^(c + d*x^n)] + b*Pi*Log[1 + I*E^(c + d*x^n)] - (2*I)*b*d*x
^n*Log[1 + I*E^(c + d*x^n)] - (2*I)*b*c*Log[Cot[((2*I)*c + Pi + (2*I)*d*x^n)/4]] + b*Pi*Log[Cot[((2*I)*c + Pi
+ (2*I)*d*x^n)/4]] - (2*I)*b*PolyLog[2, (-I)*E^(c + d*x^n)] + (2*I)*b*PolyLog[2, I*E^(c + d*x^n)]))/(2*d^2*e*n
*x^(2*n))

________________________________________________________________________________________

Maple [C]  time = 0.218, size = 368, normalized size = 2.7 \begin{align*}{\frac{ax}{2\,n}{{\rm e}^{-{\frac{ \left ( -1+2\,n \right ) \left ( i{\it csgn} \left ( ie \right ){\it csgn} \left ( ix \right ){\it csgn} \left ( iex \right ) \pi -i \left ({\it csgn} \left ( iex \right ) \right ) ^{2}{\it csgn} \left ( ie \right ) \pi -i \left ({\it csgn} \left ( iex \right ) \right ) ^{2}{\it csgn} \left ( ix \right ) \pi +i \left ({\it csgn} \left ( iex \right ) \right ) ^{3}\pi -2\,\ln \left ( e \right ) -2\,\ln \left ( x \right ) \right ) }{2}}}}}+2\,{\frac{{{\rm e}^{c}}b{{\rm e}^{-i\pi \,n{\it csgn} \left ( ie \right ){\it csgn} \left ( ix \right ){\it csgn} \left ( iex \right ) }}{{\rm e}^{i\pi \,n{\it csgn} \left ( ie \right ) \left ({\it csgn} \left ( iex \right ) \right ) ^{2}}}{{\rm e}^{i\pi \,n{\it csgn} \left ( ix \right ) \left ({\it csgn} \left ( iex \right ) \right ) ^{2}}}{{\rm e}^{-i\pi \,n \left ({\it csgn} \left ( iex \right ) \right ) ^{3}}}{{\rm e}^{i/2\pi \,{\it csgn} \left ( ie \right ){\it csgn} \left ( ix \right ){\it csgn} \left ( iex \right ) }}{{\rm e}^{-i/2\pi \,{\it csgn} \left ( ie \right ) \left ({\it csgn} \left ( iex \right ) \right ) ^{2}}}{{\rm e}^{-i/2\pi \,{\it csgn} \left ( ix \right ) \left ({\it csgn} \left ( iex \right ) \right ) ^{2}}}{{\rm e}^{i/2\pi \, \left ({\it csgn} \left ( iex \right ) \right ) ^{3}}} \left ({e}^{n} \right ) ^{2} \left ( -1/2\,\sqrt{-{{\rm e}^{2\,c}}}{x}^{n}d \left ( \ln \left ( 1+{{\rm e}^{d{x}^{n}}}\sqrt{-{{\rm e}^{2\,c}}} \right ) -\ln \left ( 1-{{\rm e}^{d{x}^{n}}}\sqrt{-{{\rm e}^{2\,c}}} \right ) \right ){{\rm e}^{-2\,c}}-1/2\,\sqrt{-{{\rm e}^{2\,c}}} \left ({\it dilog} \left ( 1+{{\rm e}^{d{x}^{n}}}\sqrt{-{{\rm e}^{2\,c}}} \right ) -{\it dilog} \left ( 1-{{\rm e}^{d{x}^{n}}}\sqrt{-{{\rm e}^{2\,c}}} \right ) \right ){{\rm e}^{-2\,c}} \right ) }{en{d}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x)^(-1+2*n)*(a+b*sech(c+d*x^n)),x)

[Out]

1/2*a/n*x*exp(-1/2*(-1+2*n)*(I*csgn(I*e)*csgn(I*x)*csgn(I*e*x)*Pi-I*csgn(I*e)*csgn(I*e*x)^2*Pi-I*csgn(I*x)*csg
n(I*e*x)^2*Pi+I*csgn(I*e*x)^3*Pi-2*ln(e)-2*ln(x)))+2*b*exp(c)*exp(-I*Pi*n*csgn(I*e)*csgn(I*x)*csgn(I*e*x))*exp
(I*Pi*n*csgn(I*e)*csgn(I*e*x)^2)*exp(I*Pi*n*csgn(I*x)*csgn(I*e*x)^2)*exp(-I*Pi*n*csgn(I*e*x)^3)*exp(1/2*I*Pi*c
sgn(I*e)*csgn(I*x)*csgn(I*e*x))*exp(-1/2*I*Pi*csgn(I*e)*csgn(I*e*x)^2)*exp(-1/2*I*Pi*csgn(I*x)*csgn(I*e*x)^2)*
exp(1/2*I*Pi*csgn(I*e*x)^3)*(e^n)^2/e/n/d^2*(-1/2*(-exp(2*c))^(1/2)*x^n*d*(ln(1+exp(d*x^n)*(-exp(2*c))^(1/2))-
ln(1-exp(d*x^n)*(-exp(2*c))^(1/2)))*exp(-2*c)-1/2*(-exp(2*c))^(1/2)*(dilog(1+exp(d*x^n)*(-exp(2*c))^(1/2))-dil
og(1-exp(d*x^n)*(-exp(2*c))^(1/2)))*exp(-2*c))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+2*n)*(a+b*sech(c+d*x^n)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 2.57839, size = 2233, normalized size = 16.54 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+2*n)*(a+b*sech(c+d*x^n)),x, algorithm="fricas")

[Out]

1/2*(a*d^2*cosh((2*n - 1)*log(e))*cosh(n*log(x))^2 + a*d^2*cosh(n*log(x))^2*sinh((2*n - 1)*log(e)) + (a*d^2*co
sh((2*n - 1)*log(e)) + a*d^2*sinh((2*n - 1)*log(e)))*sinh(n*log(x))^2 + (2*I*b*cosh((2*n - 1)*log(e)) + 2*I*b*
sinh((2*n - 1)*log(e)))*dilog(I*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + I*sinh(d*cosh(n*log(x)) + d*si
nh(n*log(x)) + c)) + (-2*I*b*cosh((2*n - 1)*log(e)) - 2*I*b*sinh((2*n - 1)*log(e)))*dilog(-I*cosh(d*cosh(n*log
(x)) + d*sinh(n*log(x)) + c) - I*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)) + (-2*I*b*c*cosh((2*n - 1)*log
(e)) - 2*I*b*c*sinh((2*n - 1)*log(e)))*log(cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + sinh(d*cosh(n*log(x
)) + d*sinh(n*log(x)) + c) + I) + (2*I*b*c*cosh((2*n - 1)*log(e)) + 2*I*b*c*sinh((2*n - 1)*log(e)))*log(cosh(d
*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) - I) + (-2*I*b*d*cosh(
(2*n - 1)*log(e))*cosh(n*log(x)) - 2*I*b*c*cosh((2*n - 1)*log(e)) + (-2*I*b*d*cosh(n*log(x)) - 2*I*b*c)*sinh((
2*n - 1)*log(e)) + (-2*I*b*d*cosh((2*n - 1)*log(e)) - 2*I*b*d*sinh((2*n - 1)*log(e)))*sinh(n*log(x)))*log(I*co
sh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + I*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + 1) + (2*I*b*d*
cosh((2*n - 1)*log(e))*cosh(n*log(x)) + 2*I*b*c*cosh((2*n - 1)*log(e)) + (2*I*b*d*cosh(n*log(x)) + 2*I*b*c)*si
nh((2*n - 1)*log(e)) + (2*I*b*d*cosh((2*n - 1)*log(e)) + 2*I*b*d*sinh((2*n - 1)*log(e)))*sinh(n*log(x)))*log(-
I*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) - I*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + 1) + 2*(a*
d^2*cosh((2*n - 1)*log(e))*cosh(n*log(x)) + a*d^2*cosh(n*log(x))*sinh((2*n - 1)*log(e)))*sinh(n*log(x)))/(d^2*
n)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (e x\right )^{2 n - 1} \left (a + b \operatorname{sech}{\left (c + d x^{n} \right )}\right )\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)**(-1+2*n)*(a+b*sech(c+d*x**n)),x)

[Out]

Integral((e*x)**(2*n - 1)*(a + b*sech(c + d*x**n)), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \operatorname{sech}\left (d x^{n} + c\right ) + a\right )} \left (e x\right )^{2 \, n - 1}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+2*n)*(a+b*sech(c+d*x^n)),x, algorithm="giac")

[Out]

integrate((b*sech(d*x^n + c) + a)*(e*x)^(2*n - 1), x)